-- Decompiled with the Synapse X Luau decompiler.

local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script);
local LogicEvent = CommonOHOH:GetPath_Loop("ReplicatedStorage.LogicEvent", game);

local ConnectClass = CommonOHOH.load.Connect();

local Actions = {};

--监听
function M.RegistHandle(self, msgId, fuc,...)
	local action=Actions[msgId]
	if not action then
		action=ConnectClass.new()
		Actions[msgId]=action
	end
	
	local arg={...}
	return action:Connect(function(...)
		for _,a in pairs({...}) do
			table.insert(arg,a)
		end
		fuc(unpack(arg))
	end)
end;


-- 全局发送事件
function M.Fire(self, msgId,...)
	if Actions[msgId] then
		Actions[msgId]:Action(...)
	end
end;

return M;
